/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once


#include <基本类型.h>
#include <string>
#include <vector>

std::string f_get系统字符编码名称();


std::wstring Utf8ToUnicode(const std::string& strUTF8);

std::wstring f_ANSIToUnicode(const std::string& str);

std::string f_Wchar_tToString(const wchar_t* wchar);

std::string f_数值序列格式(int32 value, int16 位数 = 6);

std::wstring UnicodeToGB2312(const std::wstring& uData);
uint16 f_UnicodeToGB2312(const wchar_t uData);
uint16 f_Utf8ToUnicode(const uint16 strUTF8);


std::wstring f_StringToWString(const std::string& str, std::string 编码 = "utf-8");
std::string f_WStringToString(const std::wstring str, std::string 编码 = "utf-8");
std::u16string f_str_GBKToUTF16(const std::string& gbkString);

std::wstring f_WString转码(const std::wstring& str, const std::string& 编码);
std::string f_String转码(const std::string& str, const std::string& 编码);


std::string f_WString组ToString(const std::vector<std::wstring>& str, std::string 编码 = "");
std::string f_u16string_ToString(const std::vector<std::u16string>& str, std::string 编码 = "");
std::vector<std::string> f_WString组ToString组(const std::vector<std::wstring>& str, std::string 编码 = "");

std::string f_StringToUTF8(const std::string& str);



void f_str_get汉字拼音(int nCode, std::string& strValue);

std::string f_str_汉字字符串转拼音(std::wstring text);
std::string f_str_汉字字符串转拼音(std::u16string text);


float32 f_str_对比所占权重(const std::u16string& s, const std::u16string& e, bool 对比英文);


std::wstring f_str_转小写(const std::wstring& s);
DEF_WString f_str_转小写(const DEF_WString& s);
std::string f_str_转小写(const std::string& s);

std::string f_str_u16_to_u8(const DEF_WString& str);
DEF_WString f_str_string_to_u16(const std::string& str);

std::wstring f_str_u16_to_wstring(const std::u16string& str);
DEF_WString f_str_wstring_to_u16(const std::wstring& str);


Inline std::wstring f_str_u16_to_wstring_v2(const std::u16string& str) {
	std::wstring text;
	text.assign(str.begin(), str.end());
	return text;
}

